package com.hh.demo_ui;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.hh.listeners.OnLeftMenuReceiveDataListener;


public class Sample_LeftSlidingMenu extends LeftSlidingMenuActivity implements OnLeftMenuReceiveDataListener {

	private static String SELECTED_ITEM="SelectedItem";
	private TextView _mTvSelectedItem;
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.sample_leftslidingmenu);
		
		_mTvSelectedItem=(TextView) findViewById(R.id.SLeftMenuTextSelected);

		this.setOnLeftMenuReceiveDataListener(this);
	}

	public void onClickToLeftSlidingBar(View v){
		
		slideLeftMenu(this, LeftSlidingMenuActivity.class);
	}
	
	@Override
	public void onLeftMenuReceiveData(int resultCode, Intent data) {
		
		String lSelectedItem=data.getExtras().getString(SELECTED_ITEM);
		_mTvSelectedItem.setText(lSelectedItem);
	}
}
